package main

import (
	"fmt"
	"time"
)

type Employee struct {
	ID            int
	Name, Address string
	Dob           time.Time
	Position      string
	Salary        int
	ManagerID     int
}

func main() {
	var dilbert Employee
	dilbert.Salary = 5000
	position := &dilbert.Position
	*position = "Snior " + *position

	var employeeOfTheMonth *Employee = &dilbert
	//employeeOfTheMonth.Position += " (proactive team player)"
	// 与上一句注释语句作用相同
	(*employeeOfTheMonth).Position += " (proactive team player)"
	fmt.Println(dilbert)

	fmt.Println(*EmployeeByID(123))
}

func EmployeeByID(id int) *Employee {
	employee := Employee{ID: id}
	return &employee
}
